<?php
// +----------------------------------------------------------------------
// | ThinkPHP [ WE CAN DO IT JUST THINK ]
// +----------------------------------------------------------------------
// | Copyright (c) 2006~2018 http://thinkphp.cn All rights reserved.
// +----------------------------------------------------------------------
// | Licensed ( http://www.apache.org/licenses/LICENSE-2.0 )
// +----------------------------------------------------------------------
// | Author: liu21st <liu21st@gmail.com>
// +----------------------------------------------------------------------

// return [
//     '__pattern__' => [
//         'name' => '\w+',
//     ],
//     '[hello]'     => [
//         ':id'   => ['index/hello', ['method' => 'get'], ['id' => '\d+']],
//         ':name' => ['index/hello', ['method' => 'post']],
//     ],

// ];
use think\Route;

Route::post('user','api/user/login');
//获取验证码
Route::get('code/:time/:token/:username/:is_exist','api/code/get_code');
//用户注册接口
Route::post('user/register','api/user/register');
//用户上传头像
Route::post('user/icon','api/user/upload_head_img');
//用户修改密码接口
Route::post('user/change_pwd','api/user/change_pwd');
//用户找回密码
Route::post('user/find_pwd','api/user/find_pwd');
//用户绑定手机号
Route::post('user/bind_phone','api/user/bind_phone');
//用户绑定邮箱
Route::post('user/bind_email','api/user/bind_email');
//绑定用户名
Route::post('user/bind_username','api/user/bind_username');
//用户修改呢称
Route::post('user/nickname','api/user/set_nickname');

//新增文章
Route::post('article','api/article/add_article');
//文章列表
Route::get('articles/:time/:token/:user_id/[:num]/[:page]','api/article/article_list');
//获取单个文章信息
Route::get('article/:time/:token/:article_id','api/article/article_detail');
//修改更新文章
Route::put('article','api/article/update_article');
//删除文章
Route::delete('articles/:time/:token/:article_id','api/article/del_article');






























//用户登录接口
Route::post('user/login','api/user/login');





